package com.dic.adapter;

import java.util.List;

import com.dic.R;
import com.dic.model.Dic;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

public class Listadapter extends BaseAdapter{
	
	private List<Dic> dicl = null;
	private Context context;
	public Listadapter(List<Dic> dicl, Context context) {
		this.dicl = dicl;
		this.context = context;
	}
	
	@Override
	public int getCount() {
		return dicl.size();
	}

	@Override
	public Object getItem(int arg0) {
		return null;
	}

	@Override
	public long getItemId(int position) {
		return 0;
	}

	@Override
	public View getView(int arg0, View arg1, ViewGroup arg2) {
		arg1 = LayoutInflater.from(this.context).inflate(
				R.layout.dic_list_item, null);
		ViewGroup viewGroup = (ViewGroup) arg1;
		TextView dicView = (TextView) viewGroup.findViewById(R.id.dic_item_str);
		dicView.setTextSize(26L);
		Dic curDic = dicl.get(arg0);
		dicView.setText(curDic.getWord().toString());
		return viewGroup;
	}



	
	
}